import { createAlova } from 'alova';
import adapterFetch from 'alova/fetch';

const alovaInstance = createAlova({
  requestAdapter: adapterFetch(),
  responded: (response) => {
    if (response.status == 200) return response.json();
    else throw new Error('请求失败');
  },
  cacheFor: null,
});

export default alovaInstance;
